const mutations = {
  // 设置登录弹窗界面的显示与关闭
  setLoginDisplay(state, boolean) {
    state.loginDisplay = boolean
  },
  // 设置是否登录
  setisLogin(state, boolean) {
    state.isLogin = boolean
  },
  // 设置用户信息
  setUserInfo(state, info) {
    state.userInfo = info
    window.localStorage.setItem('userInfo', JSON.stringify(info))
  },
  // 设置用户信息
  setAccountInfo(state, accountInfo) {
    state.accountInfo = accountInfo
    window.localStorage.setItem('accountInfo', JSON.stringify(accountInfo))
  },
  // 设置登录cookie
  setCookie(state, cookie) {
    state.cookie = cookie
    window.localStorage.setItem('cookie', cookie)
  }
}

export default mutations